extends "../nengdai-3/nengdai-3.gd"


var baseId = ""
var upText1 = "从容指顾额外提高吸血"
var upText2 = "新锐之刃触发阈值-5次"
func _extInit():
	._extInit()
	lv = 4             #等级的设置
	addSkill("每闪避15次，对前方一行一列的所有敌人发起一次炮击与雷击", "新锐之刃")
var p4 = 15
func upgrade():
	.upgrade()
	if upgraded == 2:
		p4 = 10

func _onHurt(atkInfo):
	._onHurt(atkInfo)
	if missNum >= p4:
		missNum = 0
		var p = 1
		if team == 2:
			p = -1
		utils.createSkillTextEff("新锐之刃", position)
		createCustEff(position, "eff/xuanZhuanDaoGuang", 15, false, 1.8, Vector2(0, -20))
		for i in utils.getAllCells(1):
			if i.y == cell.y and (i.x - cell.x)*p > 0 or i.x == cell.x + p:
				createCustEff(sys.main.map.map_to_world(i), "eff/zhan", 6, false, 0.3, Vector2(0, -40))
				var cha = matCha(i)
				if cha != null and cha.team != team:
					.normalAtkChara(cha)
					if not cha.isDeath:
						castTorpedo(cha)